package com.ec.edu.common.constants;

import io.netty.channel.ChannelId;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.util.concurrent.GlobalEventExecutor;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class NettyMap {
    /**
     * 客户端对应的ChannelId
     */
    public static Map<String, ChannelId> channelMap = new ConcurrentHashMap<>();

    /**
     * ChannelId对应的Channel
     */
    public static ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

}
